package yc.day0110;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class LifeCycleServlet extends HttpServlet {
    /*销毁*/
    @Override
    public void destroy() {
        System.out.println("执行LifeCycleServlet销毁");
    }
    /*初始化*/
    @Override
    public void init() throws ServletException {
        System.out.println("执行LifeCycleServlet初始化");
    }
    /*服务*/
    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("执行service服务");
        super.service(request, response);
    }

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) {
        System.out.println("执行doGet请求");
    }

    @Override
    protected void doDelete(HttpServletRequest req, HttpServletResponse resp) {
        System.out.println("执行doDelete请求");
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) {
        System.out.println("执行doPost请求");
    }
}
